using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using mvLibrary.Helpers.Builders;

namespace fenk.Stock.Produccion
{
    public partial class ValeMontaje : mvLibrary.BaseForm
    {

        public ValeMontaje()
        {
            InitializeComponent();
        }

        public override void BeforeCreatePdf(ref string report)
        {
            PickReportFormatterBuilder reportFormatterBuilder = new PickReportFormatterBuilder(report);

            reportFormatterBuilder.RemoveInitialCLetterError();
            reportFormatterBuilder.RemoveEWAndFWError();
            report = reportFormatterBuilder.Build();
        }
        public override void BeforeSaveReport()
        {
            // VALIDAR 
            CallProgram("CHECK.VALE.MONTAJE", 1, 1);
            if (SubErr == "1")
            {
                MessageBox.Show(ErrorMessage);
                CancelSaveItem = true;
            }
            else
            {
                CancelSaveItem = false;
            }
        }
    }
}

